TSource
IdeaBlade DevForce 2010 Help Reference
GroupBy<TSource>(IEntityQuery<TSource>,IProjectionSelector) Method
See Also  Example Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityQueryExtensions Class > GroupBy Method : GroupBy<TSource>(IEntityQuery<TSource>,IProjectionSelector) Method



source
keySelector
Groups the elements of a sequence according to a specified key selector function.

Syntax

Visual Basic (Declaration) 
<ExtensionAttribute()>
Public Overloads Shared Function GroupBy(Of TSource)( _
   ByVal source As IEntityQuery(Of TSource), _
   ByVal keySelector As IProjectionSelector _
) As ITypedEntityQuery
Visual Basic (Usage)Copy Code
Dim source As IEntityQuery(Of TSource)
Dim keySelector As IProjectionSelector
Dim value As ITypedEntityQuery
 
value = EntityQueryExtensions.GroupBy(Of TSource)(source, keySelector)
C++/CLI 
[ExtensionAttribute()]
public:
static ITypedEntityQuery^ GroupBygeneric<typename TSource>
( 
   IEntityQuery<TSource^>^ source,
   IProjectionSelector^ keySelector
) 

Parameters

source
keySelector

Type Parameters

TSource

Example

C#Copy Code
var mgr = new DomainModelEntityManager();
var entityType = typeof(Customer);
var rootQuery = EntityQuery.Create(entityType);
var ps = new ProjectionSelector("Country");

var query = rootQuery.GroupBy(ps);
var results = query.Execute();

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.